package com.dds.system.service.union.impl;

import java.util.List;
import com.dds.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dds.system.mapper.union.UnionShopOrderProfitMapper;
import com.dds.system.domain.union.UnionShopOrderProfit;
import com.dds.system.service.union.IUnionShopOrderProfitService;

/**
 * 商户(线下)订单分润Service业务层处理
 * 
 * @author gaolianjie
 * @date 2021-04-01
 */
@Service
public class UnionShopOrderProfitServiceImpl implements IUnionShopOrderProfitService 
{
    @Autowired
    private UnionShopOrderProfitMapper unionShopOrderProfitMapper;

    /**
     * 查询商户(线下)订单分润
     * 
     * @param id 商户(线下)订单分润ID
     * @return 商户(线下)订单分润
     */
    @Override
    public UnionShopOrderProfit selectUnionShopOrderProfitById(Integer id)
    {
        return unionShopOrderProfitMapper.selectUnionShopOrderProfitById(id);
    }

    /**
     * 查询商户(线下)订单分润列表
     * 
     * @param unionShopOrderProfit 商户(线下)订单分润
     * @return 商户(线下)订单分润
     */
    @Override
    public List<UnionShopOrderProfit> selectUnionShopOrderProfitList(UnionShopOrderProfit unionShopOrderProfit)
    {
        return unionShopOrderProfitMapper.selectUnionShopOrderProfitList(unionShopOrderProfit);
    }

    /**
     * 新增商户(线下)订单分润
     * 
     * @param unionShopOrderProfit 商户(线下)订单分润
     * @return 结果
     */
    @Override
    public int insertUnionShopOrderProfit(UnionShopOrderProfit unionShopOrderProfit)
    {
        unionShopOrderProfit.setCreateTime(DateUtils.getNowDate());
        return unionShopOrderProfitMapper.insertUnionShopOrderProfit(unionShopOrderProfit);
    }

    /**
     * 修改商户(线下)订单分润
     * 
     * @param unionShopOrderProfit 商户(线下)订单分润
     * @return 结果
     */
    @Override
    public int updateUnionShopOrderProfit(UnionShopOrderProfit unionShopOrderProfit)
    {
        return unionShopOrderProfitMapper.updateUnionShopOrderProfit(unionShopOrderProfit);
    }

    /**
     * 批量删除商户(线下)订单分润
     * 
     * @param ids 需要删除的商户(线下)订单分润ID
     * @return 结果
     */
    @Override
    public int deleteUnionShopOrderProfitByIds(Integer[] ids)
    {
        return unionShopOrderProfitMapper.deleteUnionShopOrderProfitByIds(ids);
    }

    /**
     * 删除商户(线下)订单分润信息
     * 
     * @param id 商户(线下)订单分润ID
     * @return 结果
     */
    @Override
    public int deleteUnionShopOrderProfitById(Integer id)
    {
        return unionShopOrderProfitMapper.deleteUnionShopOrderProfitById(id);
    }
}
